Hello,
I am learning about customizing Advance PDF forms and I am having issues generating a QR Code for a few Items.
It works fine for most of the Items, but I am getting an error message with Items like this example STR0526-L=4 - 6"See screenshot bellow.
I don't know if it is the space, or the double quotes.
• This line gives me that error at Packing Slip printing time.
barcode codetype="qrcode" value="${item.item}" height="40" width="40"/
• If I add the "*slip*" to truncate the Item Number and print until the first space, it works, bi it chops the Item.
barcode codetype="qrcode" value="${item.item?split(" ")[0]}" height="40" width="40"/
I will appreciate any help.
z
Zoran R-DATAGRAM
07/31/2025, 9:58 AM
I bet on double quotes. when FreeMarker solve ${item} it will be ended by double quote (6")
Spliting with " " and then use [0] it will be print only part before first space
I will try with "hardcoded" value (put string value=" .... " and try to get correct QR especially with \" (it is escape sequence for double quote)
m
mescalante
07/31/2025, 3:54 PM
Hi Zoran,
Yes, the double quotes were the problem.
I was able to fix it with this replace function.